//
//  SecondDegSolver.h
//  SecondDeg
//
//  Created by Stéphane Delval on 09/01/10.
//  Copyright 2010 BiWiLabs. All rights reserved.
//
// @author : Stephane Delval
// @version : 0.1.0
// @comment : interface of my second equation resolver.


#import <Cocoa/Cocoa.h>

#define MSG_ERROR     0
#define MSG_SUCCESS   1
#define MSG_DELTA_NEG 2

@interface SecondDegSolver : NSObject
{
    double firstSolution,secondSolution; // x1 and x2
    int    result_msg;                   // a result message is necessary for error handling (i.e. in case of wrong input)
} // the parameters A,B and C form the equation can be added in the class variable declaration? 

// calculation & output methods:
- (double) getDelta: (double)Param1
             Term_B: (double)Param2
             Term_C: (double)Param3;

- (double) getSolution: (double)firstParameter
                Term_B: (double)secondParameter
                Term_C: (double)thirdParameter;

- (double) getTruncatedValueOf: (double)myValueToRound
                          with: (int)myNumberOfDigitsAfterDecimal;

// output of the two solutions (if they exist!):
- (double) getFirstSolution: (int)DigitNumbersAfterDecimal; //The argument "DigigNumberAfterDecimal" can be a class variable? 
- (double) getSecondSolution: (int)DigitNumbersAfterDecimal;

@end